<?php 
/*
Engineer: Derek Shue
Updated: 12/04/2011
Manage terms view for admins. Allows admins links to actions editterm 
and deleteterm and displays each available term in a table
*/
?>


<h3>Current terms:</h3>
<dl>
<table>
<tr> <th> Term Session </th> <th> Year </th> <th> Controls </th><tr>
    <?php foreach ($this->terms as $term): ?>
    <tr align = "center">
    <td><?php echo $term['TERM'];?></td>
    <td><?php echo $term['YEAR'];?></td>
    <td>
        <a href="<?php echo $this->url(array('controller'=>'admin', 
            'action'=>'editterm', 'term'=> $term['TERM'], 'year' => $term['YEAR']));?>">Edit</a>
        <a href="<?php echo $this->url(array('controller'=>'admin', 
            'action'=>'deleteterm', 'term'=> $term['TERM'], 'year' => $term['YEAR']));?>">Delete</a>
    </td>
</tr>
    <?php endforeach ?>
    <tr>
    	<td align = "center" colspan = "3"><a href="<?php echo $this->url(array('controller'=>'admin', 
            'action'=>'submitterm'));?>"> Add New Term </a></td>
    </tr>
	</table>
</dl>

